<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>


    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 管理系统大布局 - Layui</title>

    <link rel="stylesheet" th:href="@{/libs/layui/css/layui.css}">

    <link th:href="@{/css/page.css}" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">

    <style>
    ul li{
    display: inline;
    list-style-type: none;
    padding: 5px 5px;}
    </style>

</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">校园应用系统</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
   <!--     <%&#45;&#45;  <ul class="layui-nav layui-layout-left">
        &lt;!&ndash; 移动端显示 &ndash;&gt;
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
            <i class="layui-icon layui-icon-spread-left"></i>
        </li>

        <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
        <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
        <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
        <li class="layui-nav-item">
            <a href="javascript:;">nav groups</a>
            <dl class="layui-nav-child">
                <dd><a href="">menu 11</a></dd>
                <dd><a href="">menu 22</a></dd>
                <dd><a href="">menu 33</a></dd>
            </dl>
        </li>
    </ul>&#45;&#45;%>-->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
                    tester
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">Your Profile</a></dd>
                    <dd><a href="">Settings</a></dd>
                    <dd><a href="">Sign out</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/findAll">学生基本信息管理</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">教室管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/findAllClassroom">教室信息管理</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item">
                    <a href="javascript:;">班级管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/findAllGrade">班级信息管理</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item">
                    <a href="javascript:;">宿舍管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/findAllDormitory">宿舍信息管理</a></dd>
                    </dl>
                </li>



            </ul>
        </div>
    </div>

    <div class="layui-body">



        <form action="/stuQuery" method="post">


            <div class="layui-inline" style="padding-top: 15px;">
                <label style="float: left;margin-left: 10px;padding-top: 10px">姓名:</label>
                <div style="float: left;">
                    <input  type="text" class="layui-input"  id="stuName" name="stuName" placeholder="请输入姓名">
                </div>

                <div style="float: left;margin-left: 10px;">
                    <label style="float: left;padding-top: 10px">性别:</label>
                    <select name="sex" id="sex" style="margin-top: 10px" lay-filter="sex">
                        <option value="">请选择</option>
                        <option value="F">女生</option>
                        <option value="M">男生</option>
                    </select>
                </div>

                <label style="float: left;margin-left: 10px;padding-top: 10px">手机</label>
                <div style="float: left;">
                    <input type="tel" id="mobile" class="layui-input" name="mobile"  placeholder="请输入手机号">
                </div>

                <label style="float: left;margin-left: 10px;padding-top: 10px">年龄:</label>
                <div style="float: left;">
                    <input type="text" id="age" name="age" lay-verify="required" placeholder="请输入年龄" autocomplete="off" class="layui-input">
                </div>

                <label style="float: left;margin-left: 10px;padding-top: 10px">身份证号:</label>
                <div style="float: left;">
                    <input type="text" id="idNum" name="idNum" lay-verify="identity" placeholder="请输入身份证号" autocomplete="off" class="layui-input">
                </div>

                <button type="submit" style="margin-left: 10px;" class="layui-btn">查询</button>
            </div>
        </form>





        <form action="/deleteByPrimaryKey" method="post">
            <input  type="submit"  class="layui-btn layui-btn-normal" value="删除">
            <a href="/addTz" class="layui-btn layui-btn-warm">添加</a><br>


            <table  class="table">
                <tr>
                    <th>学生id</th>
                    <th>学号</th>
                    <th>学生姓名</th>
                    <th>手机号</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>证件类型</th>
                    <th>证件号码</th>
                    <th>出生日期</th>
                    <th>详细地址</th>
                    <th>创建时间</th>
                    <th>修改时间</th>
                    <th>籍贯</th>
                    <th>操作</th>

                </tr>


                <tr th:each="list:${p.list}" class="active">

                <td th:text="${list.getStuId()}"  > </td>

                    <td th:text="${list.stuNum}"></td>
                    <td th:text="${list.stuName}"></td>
                    <td th:text="${list.mobile}"></td>

                    <td th:switch="${list.getSex()}">
                        <span th:case="F">女</span>
                        <span th:case="M">男</span>
                    </td>
                    <td th:text="${list.getAge()}"></td>

                    <td th:switch="${list.getIdType()}">
                        <span th:case="1">身份证</span>
                        <span th:case="2">军官证</span>
                        <span th:case="3">港澳台通行证</span>
                    </td>

                    <td th:text="${list.getIdNum()}"></td>

                    <td th:text="${#dates.format(list.birthday,'yyyy-MM-dd')}"></td>

                        </td>

                    <td th:text="${list.getDetailAddr()}"></td>

                    <td th:text="${#dates.format(list.createDatee,'yyyy-MM-dd')}"></td>

                    <td th:text="${#dates.format(list.updateDate,'yyyy-MM-dd')}"></td>

                        <td  th:text="${list.getProvince()}+${list.getCity()}+${list.getArea()}"></td>

                       <td>
                         <!--   <a  th:href="@{/selectByPrimaryKey(stuId=${list.getStuId()})}" class="layui-btn layui-btn-xs" lay-event="edit">修改</a>-->
                           <a  th:href="@{/updateById(stuId=${list.getStuId()})}" class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
                           <a  th:href="@{/deleteDan(stuId=${list.getStuId()})}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                       </td>


                </tr>

            </table>
        </form>

       <div class="left">
            <form action="/findAll" style="text-align: center;" method="post" >
                <ul class="pagination">
                    <li ><a  href="/findAll?pageNum=1">首页</a></li>
                    <span th:if="${p.pageNum>1}"><li><a th:href="@{/findAll(pageNum=${p.pageNum}-1)}">上一页</a></li></span>

                    <span  test="${p.pageNum<p.pages}">
                    <li ><a href="/findAll?pageNum=2">下一页</a></li>
                    </span>

                    <li ><a th:href="@{/findAll(pageNum=${p.pages})}">末页</a></li>
                    <li><a  th:text="${p.pages}"></a></li>
                  <li><a >跳到<input type="text" name="pageNum" style="width: 20px; height: 20px">页</a></li>
                    <li><a><input type="submit" value="GO" /></a></li>
                </ul>
            </form>
        </div>


    </div>




    <div class="layui-footer">
        <!-- 底部固定区域 -->
        底部固定区域
    </div>
</div>
<script th:src="@{/libs/layui/layui.js}">

</script>

</body>
</html>
